package com.ruibang.glass.quality.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 工程变更单信息
 * </p>
 *
 * @author wujie
 * @since 2024-01-23
 */

@ApiModel(value ="工程变更单信息")
@TableName("g_engineering_change_order")
@Data
public class EngineeringChangeOrder implements Serializable {

    @ApiModelProperty(value = "工程变更单ID")
    @TableId(value = "change_order_id", type = IdType.ASSIGN_ID)
    private String changeOrderId;
    @ApiModelProperty(value = "项目名称")
    private String itemName;
    @ApiModelProperty(value = "产品名称")
    private String productName;
    @ApiModelProperty(value = "变更编号")
    private String changeCode;
    @ApiModelProperty(value = "申请部门")
    private String applyDept;

    @ApiModelProperty(value = "申请部门名称")
    @TableField(exist = false)
    private String applyDeptName;

    @ApiModelProperty(value = "申请日期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime applyTime;

    @ApiModelProperty(value = "生效日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime effectTime;


    @ApiModelProperty(value = "申请人")
    private String applyUser;

    @ApiModelProperty(value = "申请人名称")
    @TableField(exist = false)
    private String applyUserName;

    @ApiModelProperty(value = "涉及供应商")
    private String supplier;
    @ApiModelProperty(value = "0:不需要确认,1:需要确认")
    private String clientAffirm;
    @ApiModelProperty(value = "变更项目")
    private String changeItem;
    @ApiModelProperty(value = "变更类型")
    private String changeType;
    @ApiModelProperty(value = "变更类别")
    private String changeCategory;
    @ApiModelProperty(value = "变更来源")
    private String changeSource;
    @ApiModelProperty(value = "变更内容以及原因")
    private String changeContent;
    @ApiModelProperty(value = "变更验证检测结果")
    private String changeResult;
    @ApiModelProperty(value = "变更验证结论")
    private String changeConclusion;

    @ApiModelProperty(value = "变更内容及原因文件关联")
    @TableField(exist = false)
    private List<String> contentFiles;

    @ApiModelProperty(value = "变更验证检测结果文件关联")
    @TableField(exist = false)
    private List<String> resultFiles;

    @ApiModelProperty(value = "删除变更内容及原因文件关联")
    @TableField(exist = false)
    private List<String> deleteContentFiles;

    @ApiModelProperty(value = "删除变更验证检测结果文件关联件")
    @TableField(exist = false)
    private List<String> deleteResultFiles;

    @ApiModelProperty(value = "变更涉及部门")
    @TableField(exist = false)
    private List<String> involveDeptIds;

    @ApiModelProperty(value = "变更涉及文件")
    @TableField(exist = false)
    private List<String> involveFiles;

    @ApiModelProperty(value = "检测结果日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime resultTime;

    @ApiModelProperty(value = "验证结论日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime conclusionTime;

    @ApiModelProperty(value = "是否删除(1:是,0:否)")
    @TableLogic
    private String isDelete;

    @ApiModelProperty(value = "流程Id")
    @TableField(exist = false)
    private String processId;

    @ApiModelProperty(value = "状态")
    @TableField(exist = false)
    private String status;

    @ApiModelProperty(value = "审批状态")
    private String approveStatus;

    @ApiModelProperty(value = "审批节点")
    @TableField(exist = false)
    private String nodeName;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUserName;

    @ApiModelProperty(value = "审批人Id")
    @TableField(exist = false)
    private String approveUserId;

    @ApiModelProperty(value = "菜单Id")
    @TableField(exist = false)
    private String menuId;

}
